package com.qf.mp2203.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_user") //定义表名
public class User {

    @TableId(type = IdType.AUTO) //设置主键自增 指定主键生成策略:自增 注意数据库表中也要做自增设置
    private Long id;
    @TableField("username") //字段注解,定义数据库表中对应的列名
    private String name;
    private Integer age;
    private String email;

}
